﻿using System;
using System.Linq;
using ESN.Models;


namespace ESN.Helpers
{
    public class DynamicPartial
    {
        public static string GetMenu()
        {
            ESNCoreDbContext core = new ESNCoreDbContext();

            var menu = core.Apps.Where(c => c.AppPublic == true);

            string menuList = "<ul>";
            foreach (var item in menu)
            {
                menuList += "<li>" + item.AppName + "</li>";
            }
            menuList += "</ul>";

            return menuList;
        }

        public static string GetNotification()
        {
            return "<section class=\"featured\"><div class=\"content-wrapper\">aaaaaaaaaaaa</div></section>";
        }
    }
}